<% content_for :sitemap do %><span class="current">加入社区</span><% end %>

<div class="row">
  <div class="col-md-5 col-md-offset-2">
    <div class="panel panel-default">
      <div class="panel-heading"><%= t("common.login") %></div>
      <div class="panel-body">
        <%= simple_form_for(resource, as: resource_name, url: session_path(resource_name), html: { class: "" }) do |f| %>
        <div class="form-group">
          <%= f.text_field :login, type: :email, class: "form-control", placeholder: "用户名 / Email" %>
        </div>
        <div class="form-group">
          <%= f.text_field :password, type: :password, class: "form-control", placeholder: "密码" %>
        </div>
        <div class="form-group">
          <%= rucaptcha_input_tag(class: 'form-control', placeholder: t('common.captcha')) %>
        </div>
        <div class="form-group">
          <a class="rucaptcha-image-box" href="#">
            <%= rucaptcha_image_tag %>
          </a>
        </div>
        <% if devise_mapping.rememberable? -%>
        <div class="from-group checkbox">
            <label for="user_remember_me">
              <%= f.check_box :remember_me %> <%= t("common.remember_me") %>
            </label>
        </div>
        <% end -%>
        <div class="form-group">
            <%= f.submit t("common.login"), class: "btn btn-primary btn-block", 'data-disable-with' => t("common.logining") %>
        </div>
        <% end %>
      </div>
      <div class="panel-footer">
        <%= render partial: "devise/shared/links" %>
      </div>
    </div>
  </div>
  <div class="col-md-3">
    <div class="panel panel-default">
      <div class="panel-heading"><%= t("common.auth_with_other_services") %></div>
      <ul class="list-group">
        <li class="list-group-item"><%= link_to raw("<i class='fa fa-github'></i> GitHub"), user_omniauth_authorize_path(:github), class: "btn btn-default btn-lg btn-block" %> </li>
      </ul>
    </div>
  </div>
</div>
